
add_executable(test-hello helloworld.cpp)

target_link_libraries(test-hello PRIVATE GTest::gtest GTest::gtest_main ${FFMPEG_LIBRARIES})

target_include_directories(test-hello PRIVATE ${FFMPEG_INCLUDE_DIRS})

gtest_discover_tests(test-hello)


add_executable(test-demuxer
        demuxer.cpp)

target_link_libraries(test-demuxer PRIVATE GTest::gtest GTest::gtest_main demuxer)

target_compile_definitions(test-demuxer PRIVATE VIDEO_PATH="${PROJECT_SOURCE_DIR}/video/tt2.mkv")

gtest_discover_tests(test-demuxer)

add_executable(test-decoder
        decoder.cpp)

target_link_libraries(test-decoder PRIVATE GTest::gtest GTest::gtest_main demuxer decoder)

target_compile_definitions(test-decoder PRIVATE VIDEO_PATH="${PROJECT_SOURCE_DIR}/video/tt2.mkv")

gtest_discover_tests(test-decoder)

add_executable(test-encoder
        encoder.cpp)

target_link_libraries(test-encoder PRIVATE GTest::gtest GTest::gtest_main demuxer decoder encoder)

target_compile_definitions(test-encoder PRIVATE VIDEO_PATH="${PROJECT_SOURCE_DIR}/video/tt2.mkv")

gtest_discover_tests(test-encoder)

add_executable(test-muxer
        muxer.cpp)

target_link_libraries(test-muxer PRIVATE GTest::gtest GTest::gtest_main demuxer decoder encoder muxer)

target_compile_definitions(test-muxer
        PRIVATE VIDEO_PATH="${PROJECT_SOURCE_DIR}/video/tt2.mkv"
        PRIVATE VIDEO_OUTPUT_PATH="${PROJECT_SOURCE_DIR}/video/tt2.mp4")

gtest_discover_tests(test-muxer)

add_executable(test-process
        process.cpp)

target_link_libraries(test-process PRIVATE GTest::gtest GTest::gtest_main glog::glog utils demuxer muxer)

target_compile_definitions(test-process
        PRIVATE VIDEO_PATH="${PROJECT_SOURCE_DIR}/video/tt2.mkv"
        PRIVATE VIDEO_OUTPUT_PATH="${PROJECT_SOURCE_DIR}/video/tt2.mp4")

gtest_discover_tests(test-process)


add_executable(test-metadata metadata.cpp)

target_compile_definitions(test-metadata PRIVATE VIDEO_PATH="${PROJECT_SOURCE_DIR}/video/tt2.mkv")

target_link_libraries(test-metadata PRIVATE utils GTest::gtest GTest::gtest_main glog::glog ${FFMPEG_LIBRARIES})

gtest_discover_tests(test-metadata)